package com.yaoz.cloud.serverapi;

import com.yaoz.cloud.entity.User;
import com.yaoz.cloud.entity.UserFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "REST-SERVER", path = "/rest-server", fallback = UserFallBack.class)
public interface HelloRestService {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public Map<String, Object> hello(@RequestParam("name") String name);


    @RequestMapping(value = "/getTokenAndUserInfo", method = RequestMethod.GET)
    public Map<String, Object> getTokenAndUserInfo(@RequestParam("userCenterId") String userCenterId);

    @RequestMapping(value = "/getAllUserInfo", method = RequestMethod.GET)
    public List<User> getAllUserInfo();
}